#ifndef MTIMER_H
#define MTIMER_H

#include "mobject.h"

class MTimerPrivate;

class MTimer : public MObject
{
	M_DECLARE_PRIVATE(MTimer)

	public:
		explicit MTimer(MObject *parent = 0);
		virtual ~MTimer();

	public:
		int time();
		bool isStart();

	public:
		void setTime(int msecs);
		void start(int msecs);
		void start();
		void stop();

	signals:
		SIGNAL(timeout)(){TRIGGER(MTimer::timeout)}

	protected:
		virtual void timerEvent(MTimerEvent *event);
};


#endif //MTIMER_H
